<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@include file="/include/head.jsp"%>
<div id="cc" class="easyui-layout" style="width:100%;height:100%;">   
	<div data-options="region:'center',title:'订单明细信息'" style="padding:5px;background:#eee;">
		<form id="editForm"   method="post" enctype="multipart/form-data" >
			<input id="id" name="id" type="hidden" value="${vo.id}">
			<table cellpadding="0" cellspacing="1" class="formtable">
				<tr>
				<td align="right"><label class="Validform_label">订单头ID:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="orderhId" name="orderhId"
				 data-options="required:true" value="${vo.orderhId}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">外部订单编号:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="extOrderNo" name="extOrderNo"
				 data-options="required:true" value="${vo.extOrderNo}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">产品ID:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="productId" name="productId"
				 data-options="required:true" value="${vo.productId}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">产品名称:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="productName" name="productName"
				 data-options="required:true" value="${vo.productName}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">产品规格:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="productSpec" name="productSpec"
				 data-options="required:true" value="${vo.productSpec}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">单位:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="unit" name="unit"
				 data-options="required:true" value="${vo.unit}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">数量:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="productNum" name="productNum"
				 data-options="required:true" value="${vo.productNum}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">收货地址ID:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="recvId" name="recvId"
				 data-options="required:true" value="${vo.recvId}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">收货单位:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="recvName" name="recvName"
				 data-options="required:true" value="${vo.recvName}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">收货地址:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="recvAdd" name="recvAdd"
				 data-options="required:true" value="${vo.recvAdd}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">收货电话:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="recvTel" name="recvTel"
				 data-options="required:true" value="${vo.recvTel}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">unit_price:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="unitPrice" name="unitPrice"
				 data-options="required:true" value="${vo.unitPrice}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">总价:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="totalPrice" name="totalPrice"
				 data-options="required:true" value="${vo.totalPrice}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">是否安排送货:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="isPlanSend" name="isPlanSend"
				 data-options="required:true" value="${vo.isPlanSend}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">送货日期:</label></td>
				<td class="value">
				<input class="easyui-datebox" type="text"  id="sendDate" name="sendDate"
				 data-options="required:true" value="${vo.sendDate}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">送货方式:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="sendWay" name="sendWay"
				 data-options="required:true" value="${vo.sendWay}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">送货人:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="deliveryman" name="deliveryman"
				 data-options="required:true" value="${vo.deliveryman}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">是否签收:</label></td>
				<td class="value">
				<input class="easyui-numberbox" type="text"  id="isSigned" name="isSigned"
				 data-options="required:true" value="${vo.isSigned}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">签收人:</label></td>
				<td class="value">
				<input class="easyui-textbox" type="text"  id="signer" name="signer"
				 data-options="required:true" value="${vo.signer}" />
				 
				</td>
				</tr>
				<tr>
				<td align="right"><label class="Validform_label">签收日期:</label></td>
				<td class="value">
				<input class="easyui-datebox" type="text"  id="signDate" name="signDate"
				 data-options="required:true" value="${vo.signDate}" />
				 
				</td>
				</tr>
			</table>
		</form>
	</div>
	<div data-options="region:'south'" style="height:35px;text-align: center;padding-top: 5px">
	 	<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="save()" >保存</a>  
	 	<a id="btncancel" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="closeDialog()">关闭</a>  
	 </div>
</div>
<script type="text/javascript">
var dialog = frameElement.dialog;
$(function() {
	  if(dialog.dialog('options').formData)
		{
			var formData = dialog.dialog('options').formData;
			//设置ID
			$("#id").val(formData.id);
				//设置orderhId
			$("#orderhId").numberbox('setValue',formData.orderhId);
				//设置extOrderNo
			$("#extOrderNo").textbox('setValue',formData.extOrderNo);
				//设置productId
			$("#productId").numberbox('setValue',formData.productId);
				//设置productName
			$("#productName").textbox('setValue',formData.productName);
				//设置productSpec
			$("#productSpec").textbox('setValue',formData.productSpec);
				//设置unit
			$("#unit").textbox('setValue',formData.unit);
				//设置productNum
			$("#productNum").numberbox('setValue',formData.productNum);
				//设置recvId
			$("#recvId").numberbox('setValue',formData.recvId);
				//设置recvName
			$("#recvName").textbox('setValue',formData.recvName);
				//设置recvAdd
			$("#recvAdd").textbox('setValue',formData.recvAdd);
				//设置recvTel
			$("#recvTel").textbox('setValue',formData.recvTel);
				//设置unitPrice
			$("#unitPrice").numberbox('setValue',formData.unitPrice);
				//设置totalPrice
			$("#totalPrice").numberbox('setValue',formData.totalPrice);
				//设置isPlanSend
			$("#isPlanSend").numberbox('setValue',formData.isPlanSend);
				//设置sendDate
			$("#sendDate").datebox('setValue',formData.sendDate);
				//设置sendWay
			$("#sendWay").textbox('setValue',formData.sendWay);
				//设置deliveryman
			$("#deliveryman").textbox('setValue',formData.deliveryman);
				//设置isSigned
			$("#isSigned").numberbox('setValue',formData.isSigned);
				//设置signer
			$("#signer").textbox('setValue',formData.signer);
				//设置signDate
			$("#signDate").datebox('setValue',formData.signDate);
		}
	  
});

function save(){
	if(!$("#editForm").form('validate'))
	{
		$.messager.alert("验证结果","表单验证失败",'error',function(){
    	});
		return;
	}
	if($.isFunction(dialog.dialog('options').callback))
	{
		dialog.dialog('options').callback($("#editForm").serializeObject());
	}
	closeDialog();
}
function closeDialog()
{
	dialog.dialog("close");
}

</script>
